package org.nashua.toughtechs151.dash;

import org.nashua.toughtechs151.ChocolateChip;

public class Data {
	private Connection con;
        private ChocolateChip cc;
	public Data(Connection co, ChocolateChip cc){
            con=co;
            this.cc = cc;
	}
	public void updateCAN(int i, String name, String speed, String volt) {
            con.sendData("CAN["+i+","+name+","+speed+","+volt+"]");
	}
	public void updatePWM(String put,int i, String name, String value) {
            con.sendData("PWM["+put+","+i+","+name+","+value+"]");
	}
	public void updateInfo(String str, String value) {
            con.sendData("INFO["+str+","+value+"]");
	}
        public String requestInfo(String req) {
            String r = "REQUEST["+req+"]";
            con.sendData(r);
            r = con.requestData(req);
            return r;
        }
}
